#-*- coding:UTF-8 -*-


import os.path
import unittest
import logging

from platmgt.test.orm_test import *
from platmgt.test.ldap_test import LDAPTest
from platmgt.test.html_test import HtmlMenuTest

logging.basicConfig(level=logging.DEBUG)
logging.getLogger().handlers=[logging.NullHandler()]
logging.getLogger('tornado.application').handlers.append(logging.StreamHandler())


def add_DB_test_suite(suite):
    print('add_DB_test_suite->')
    #suite.addTests(unittest.TestLoader().loadTestsFromTestCase(DBSchemaInit))
    #suite.addTests(unittest.TestLoader().loadTestsFromTestCase(DBDataInit))
    #suite.addTests(unittest.TestLoader().loadTestsFromTestCase(DBQueryTest))
    suite.addTests(unittest.TestLoader().loadTestsFromTestCase(HtmlMenuTest))
    #suite.addTests(unittest.TestLoader().loadTestsFromTestCase(DBSchemaDrop))
    #suite.addTests(unittest.TestLoader().loadTestsFromTestCase(LDAPTest))




def set_test_suite():
    suite = unittest.TestSuite()
    add_DB_test_suite(suite)
    return suite


if __name__ == '__main__':
    print('='*30+' test.py start '+'='*30)
    suite = set_test_suite()
    unittest.TextTestRunner(verbosity=2).run(suite)
    print('='*30+' test.py  end  '+'='*30)